<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title></title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<link rel="stylesheet" type="text/css" href="/static/shop/account/css/style.css"/>
	<link rel="stylesheet" type="text/css" href="/static/shop/account/css/swiper.min.css"/>
	<link rel="stylesheet" href="/static/shop/account/css/LCalendar.css">
</head>
<body>
<div class="login">
	<a href="{:url('/')}" title="首页">
		<img style = 'width: 9rem;
    margin-top: 1rem;'src="__MODULE_IMG__/logo.png">
	</a>
	<ul>
		{notempty name='user'}
		<!--<a href="/account/update/" title="" class="ucter">
            欢迎  {$user.mobile}
        </a>
        <span class="separate">|</span>-->
		<a href="{:url('shop/account/index')}" title="个人中心">个人中心</a>
		<span class="separate">|</span>
		<!--
                        <a href="{:url('shop/account/love')}" title="我的关注">我的关注</a>

                        <span class="separate">|</span>
                        <a href="{:url('shop/artwork/cart')}" title="购物车">购物车</a>
                        <span class="separate">|</span>-->
		<a href="{:url('shop/login/logout')}" title="退出">退出</a>
		{else/}

		<li><a href="{:url('shop/login/index')}" title="登录">登录</a></li>
		<li>|</li>
		<li><a href="{:url('shop/login/register')}" title="注册">注册</a></li>
		{/notempty}
	</ul>
</div>

{include file="public:nav"/}
{include file="public:menu"/}

<ul class="index_xuan">
	<li><a href="{:url('shop/account/userinformation')}" style="color:#FFFFFF;">账户信息</a></li>
	<li>认证信息</li>
	<li class="bor">我的喜好</li>
	<li><a href="{:url('shop/account/address')}" style="color:#FFFFFF;">收货地址</a></li>
</ul>

<div class="inp">
	<div>
		{foreach $type as $k=>$v}
			<p>{$v}</p>
			{foreach $likeInfo as $k1=>$v1}
				{if condition="$k eq $v1['type']"}
					<label><input name="like_id" type="checkbox"  {if condition="in_array($v1['id'],$like)"}checked{/if} value="{$v1.id}" />{$v1.title} </label> 
				{/if}
			{/foreach}
		{/foreach}
		<p>其他标签</p>
		<input type="text" name="like_text" value="{$likeText}" id="like_text">
		<p>多个请用","隔开</p>
	</div>

	<div id="submit" class="details" style="width: 100%;  
    height: 3.15rem;
    background: #231916;
    color: #FFFFFF;
    font-size: 1rem;
    text-align: center;
    line-height: 3.15rem;
    margin-top: 1rem;
    border-radius: .25rem;">
		保存
	</div>
</div>

<div class="call">
	<a href="tel:4006667899" style="    color: #fff;"><img src="/static/shop/mobile/img/tel111.png" /></a>
	<a href="tel:4006667899" style="    color: #fff;"><p>收藏热线：400 666 7899</p></a>
</div>

<div class="footer">
	{include file="public:single"/}
</div>
<p class="icp">网站备案号：晋ICP备10002939号</p>
</body>
<script src="/static/shop/account/js/jquery-3.2.1-min.js"></script>
<script src="/static/shop/account/js/PhoneJs.js"></script>

</html>
<script src="/static/shop/account/js/LCalendar.js"></script>
<script>
    $(document).ready(function () {
        $("#submit").on("click", function () {
        	like_id = $("input:checkbox[name='like_id']:checked").map(function(index,elem) {
            return $(elem).val();
        }).get().join(',');
            $.ajax({
                url: "{:url('shop/like/ajaxLike')}",
                type: "POST",
                dataType: "JSON",
                data: {
                    like_id:like_id,
                    like_text : $("#like_text").val()
                },
                success: function (data) {
                    alert(data.msg);
                    if (data.code == "0") {
                        window.location.href = "{:url('shop/Like/index')}";
                    }

                }
            });
        });
    });

</script>